<template>
        <li v-for="obj in list" :ket="obj.id">
            <p><img :src="obj.image" alt="" style="width: 100%;"></p>
            <p  class="van-multi-ellipsis--l2">{{ obj.title }}</p>
           <p style="color: red;">￥{{ obj.price }}</p>
        </li>
        <van-action-bar>
  <van-action-bar-icon icon="chat-o" text="客服" dot />
  <van-action-bar-icon icon="cart-o" text="购物车" badge="5"@click="$router.push('/addshop.vue')"  />
  <van-action-bar-icon icon="shop-o" text="店铺" badge="12" />
  <van-action-bar-button type="warning" text="加入购物车" />
  <van-action-bar-button type="danger" text="立即购买" />
</van-action-bar>
</template>
<script setup>
 import request from '@/utils/request.js'
 import {  onMounted,ref} from "vue";
 import { useRouter, useRoute } from 'vue-router'

const router = useRouter()
const route = useRoute()
  const list=ref([])
  onMounted(()=>{
    request.get('/detail',{
        params:{
            route:route.id
        }
    }).then(res=>{
        if(res.data.code==200){
            list.value=res.data.data
        }
    })
  })
</script>